package com.coupons.business.merchant.dao;

import java.util.List;

import com.coupons.business.common.exception.BaseCouponsAppException;
import com.coupons.business.common.vo.Merchant;

public interface IMerchantDAO 
{
	public void createMerchant(Merchant objaMerchant) throws BaseCouponsAppException;
	public void updateMerchant (Merchant objaMerchant) throws BaseCouponsAppException;
	public Merchant getMerchant(int MerchantId) throws BaseCouponsAppException;
	public Merchant getMerchant(String straMerchantName) throws BaseCouponsAppException;
	public List<Merchant> getAllMerchants()throws BaseCouponsAppException ;
	
	public void createMerchantV1(Merchant objaMerchant) throws BaseCouponsAppException;
	public void updateMerchantV1 (Merchant objaMerchant) throws BaseCouponsAppException;
	
	public String MERCHANT_INSERT_STATEMENT = "INSERT INTO MERCHANT(MRCHNT_ID,MRCHNT_NAME,PARTNER_ID,DESCRIPTION," +
											  "STATUS,LCSN_END_DT,RANK,MERCHANT_OFFER_HEADER,MERCHANT_SITE_URL," +
											  "MERCHANT_EMBLEM,MERCHANT_ASSOCIATION_ID,LAST_UDT_USER," +
											  "CRTN_DT,LAST_UPDT_DT) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,SYSDATE,SYSDATE)";
	
	public String MERCHANT_UPDATE_STATEMENT = "UPDATE MERCHANT SET MRCHNT_NAME = ?, DESCRIPTION = ?, " +
											  "STATUS=?, LCSN_END_DT=?, RANK=?, MERCHANT_OFFER_HEADER=?, MERCHANT_SITE_URL=?, " +
											  "MERCHANT_EMBLEM=?, MERCHANT_ASSOCIATION_ID=?, " +
											  "LAST_UDT_USER=?, LAST_UPDT_DT=SYSDATE WHERE MRCHNT_ID = ?";
	
	public String SEQUENCE_NAME="MERCHANT_SQ";
	
	public String GET_ALL_MERCHANTS_STATEMENT = "SELECT * FROM MERCHANT";
	
	public String GET_MERCHANT_STATEMENT = "SELECT * FROM MERCHANT where MRCHNT_ID = ?";
	
	public String GET_MERCHANT__BY_NAME_STATEMENT = "SELECT * FROM MERCHANT where MRCHNT_NAME = ?";
	
	
}
